﻿@{
    Layout = null;
    ViewBag.Title = "Index";
}

<!DOCTYPE html>
<html>
<head profile="http://www.w3.org/1999/xhtml/vocab">
    <meta charset="utf-8" />
    <link rel="shortcut icon" href="http://www.xiaopangniu.net/favicon.ico" type="image/vnd.microsoft.icon" />
    <meta name="Generator" content="Drupal 7 (http://drupal.org)" />
    <title>在线美食城-@ViewBag.Title</title>
    <link href="~/Prototype/css/1.css" rel="stylesheet" type="text/css" media="all" />
    <link href="~/Prototype/css/2.css" rel="stylesheet" type="text/css" media="all" />
    <link href="~/Prototype/css/3.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="~/Prototype/css/4.css" rel="stylesheet" type="text/css" media="all" />
    <link href="~/Prototype/css/5.css" rel="stylesheet" type="text/css" media="all" />
    <link href="~/Prototype/css/6.css" rel="stylesheet" type="text/css" media="all" />
    <link href="~/scriptstyle/css/base.css" rel="stylesheet" />
    <script type="text/javascript" src="~/Prototype/js/1.js"></script>
    <script type="text/javascript" src="~/Prototype/js/2.js"></script>
    <script type="text/javascript" src="~/Prototype/js/3.js"></script>
    <script src="~/Prototype/js/drupal.js"></script>
    <script src="~/Prototype/js/jquery.js"></script>
    <script src="~/Prototype/js/jquery.once.js"></script>
    <script src="~/Prototype/js/jquery.colorbox-min.js"></script>
    <script src="~/Prototype/js/colorbox.js"></script>
    <script src="~/Prototype/js/colorbox_default_style.js"></script>
    <script src="~/Prototype/js/colorbox_load.js"></script>
    <script src="~/Prototype/js/colorbox_inline.js"></script>
    <script src="~/Prototype/js/panels.js"></script>
    <script src="~/Prototype/js/modernizr-1.7.min.js"></script>
    <script src="~/Prototype/js/jquery.easing.1.3.js"></script>
    <script src="~/Prototype/js/jquery.jcarousel.min.js"></script>
    <script src="~/Prototype/js/script.js"></script>
    <script src="~/scriptstyle/dsdialog.js"></script>
    <script>
        function add(n)
        {
           
            var id=@Session["UserID"];
            if(id==0)
            {
                ds.dialog({
                    title : '消息提示',
                    content : '请登录后再进行购买！',
                    onyes:true,
                    icon : "info.png",
                });     
                location.href="/Login/Usert";
            }
            else{
                $.ajax({
                    type:'get',
                    url:'http://localhost:19451/api/menu/GetMenuIdshow',
                    data:{
                        id:n,
                    },
                    success:function(data){
                        if(data==""){
                            alert("");
                        }
                        else
                        {
                            var arr=JSON.parse(data);
                            $(arr).each(function(i,obj){
                                $.ajax({
                                    type: "Get", //访问WebService使用Post方式请求
                                    url: "http://localhost:19451/api/menu/getaddcar",
                                    data:{
                                        CarId:obj.MenuId,
                                        CarName:obj.MenuName,
                                        CarPhoto:obj.MenuPhoto,
                                        CarDescrib:obj.MenuDescrib,
                                        CarPrice:obj.MenuPrice,
                                        CarNum:1,
                                        UserId:id,
                                    },
                                    success: function (response) { //回调函数，result，返回值


                                        if(response==1)
                                        {
                                            alert('添加成功');
                                        }
                                        else if(response==2)
                                        {
                                            alert('添加成功');
                                        }
                                        else
                                        {
                                            alert('没有此菜品');
                                        }
                                    }
                                })

                            })


                        }
                    }
                })

            }
           

        }
    </script>
</head>

<body class="html front not-logged-in no-sidebars page-front-page home has-slider">
    <div id="skip-link">
        <a href="#main-content" class="element-invisible element-focusable">Skip to main content</a>
    </div>
    <div id="wrapper">
        <!-- LOGIN POP UPS -->
        <div id="popup-overlay"></div>
        <div class="wrapper">
            <header>
                <div class="top-nav">
                    <nav>
                        <ul class="menu">
                            <li class="first leaf"><a href="/Register/Register" title="">注册</a></li>
                            <li class="leaf"><a href="/Login/Usert" title="">登录</a></li>
                            <li class="leaf"><a href="/Home/quanMenu" title="">全部菜单</a></li>
                            <li class="leaf"><a href="/Home/ShoppingCar" title="">我的购物车</a></li>
                            <li class="leaf"><a href="/Order/ShoppingCarList" title="">我的定单</a></li>
                            <li class="last leaf"><a href="/Home/Specification" title="">软件说明</a></li>
                        </ul>
                    </nav>

                    <div class="search-form">
                        <form action="/" method="post" id="search-block-form" accept-charset="UTF-8">
                            <div>
                                <div class="container-inline">
                                    <h2 class="element-invisible">Search form</h2>
                                    <div class="form-item form-type-textfield form-item-search-block-form">
                                        <label class="element-invisible" for="edit-search-block-form--2">Search </label>
                                        <input title="Enter the terms you wish to search for." type="text" id="edit-search-block-form--2" name="search_block_form" value="" size="15" maxlength="128" class="form-text" />
                                    </div>
                                    <div class="form-actions form-wrapper" id="edit-actions--8"><input type="submit" id="edit-submit--2" name="op" value="Search" class="form-submit" /></div><input type="hidden" name="form_build_id" value="form-C4H_q0QnGnVs6uK2gMyV7aCXp1CTYz_oDfxQ1El91LM" />
                                    <input type="hidden" name="form_id" value="search_block_form" />
                                </div>
                            </div>
                        </form>
                    </div>

                </div>
                <a class="logo" href="/" title="Home" rel="home" id="logo">
                    <img src="http://cooker.envato.tabvn.com/sites/all/themes/cooker/logo.png" alt="Home" />
                </a>

                <nav class="main-menu">
                    <ul class="menu">
                        <li class="first leaf"><a href="/Home/ChinaMenu?idd=1">中餐</a></li>
                        <li class="leaf"><a href="/Home/sylefood?idd=2">西餐</a></li>
                        <li class="leaf"><a href="/Home/Menu?idd=3">点心</a></li>
                        <li class="leaf"><a href="/Home/drink?idd=4">饮品</a></li>
                        <li class="leaf"><a href="/Home/setmeal?idd=5">套餐</a></li>
                        <li class="last leaf"><a href="/Home/work?idd=6">工作餐</a></li>
                    </ul>
                </nav>
                <div class="header-slider-canvas">
                    <div class="parts part-1"></div>
                    <div class="parts part-2"></div>
                    <div class="parts part-3"></div>
                </div>
                <ul id="mycarousel" class="jcarousel-skin-header-slider">
                    @Html.Raw(ViewBag.bb)
                </ul>
              
            </header>

            <div class="content clearfix">
            </div>
            <div id="content" class="column content-inner">
                <div class="section">
                    <div class="region region-content">
                        <div id="block-system-main" class="block block-system">
                            <div class="content">
                                <div class="panel-flexible panels-flexible-1 clearfix">
                                    <div class="panel-flexible-inside panels-flexible-1-inside">
                                        <div class="panels-flexible-region panels-flexible-region-1-center panels-flexible-region-first panels-flexible-region-last">
                                            <div class="inside panels-flexible-region-inside panels-flexible-region-1-center-inside panels-flexible-region-inside-first panels-flexible-region-inside-last">
                                                @*今日推荐块*@
                                                <div class="panel-pane pane-block pane-custom-meals-of-the-day">
                                                    <div class="pane-content">
                                                        <div id="meals-of-the-day">
                                                            <h3 class="title-separator"><span class="title">今日推荐</span><span class="sep"></span></h3>
                                                            <ul>
                                                                @Html.Raw(ViewBag.s)
                                                            </ul>
                                                        </div>
                                                    </div>
                                                </div>
                                                @*推荐套餐块*@
                                                <div class="panel-pane pane-block pane-custom-featured-meals">
                                                    <div class="pane-content">
                                                        <h3 class="title-separator"><span class="title">推荐套餐	</span><span class="sep"></span></h3>
                                                        <div id="featured-meals">
                                                            <ul>
                                                                @Html.Raw(ViewBag.c)

                                                            </ul>
                                                        </div>
                                                    </div>
                                                </div>
                                                @*最新优惠块*@
                                                <div class="panel-pane pane-block pane-custom-custom-cart">
                                                    <h2 class="pane-title">最新优惠</h2>
                                                    <div class="pane-content">
                                                        <p class="cart-block-items uc-cart-empty">【解乏必备】太极八宝粥</p><div class="cart-box">
                                                            <div class="body">
                                                                <ul>
                                                                    <li class="info">
                                                                        <span class="products"><strong><span class="num-items">0</span> Items</strong></span>
                                                                        <a href="/cart">View cart</a>
                                                                    </li>
                                                                    <li class="price">
                                                                        <span class="label">加入会员更享受9折优惠哦</span>
                                                                    </li>
                                                                </ul><a class="submit-button" href="/cart/checkout">去看看</a>
                                                                <div class="graphic"></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @*footer部分，使用共同分布式视图  *@
    @Html.Partial("Viewfooter")
    
</body>

</html>
